<div class="paylog">

<h3><{"Monthly Report"|msg}></h3>

<{include file="db:`$paylog.dirname`.tab_menu.tpl"}>

<table class="outer calender">

<tr>
<th colspan="7">

<span class="lastMonth">
<a href="<{url controller="calender" book_id=$paylog.book_id month=$paylog.previous.date}>">
<{$paylog.previous.time|date_format:$paylog.month_format}>
</a>
</span>

<{$paylog.current.time|date_format:$paylog.date_format}>

<span class="nextMonth">
<a href="<{url controller="calender" book_id=$paylog.book_id  month=$paylog.next.date}>">
<{$paylog.next.time|date_format:$paylog.month_format}>
</a>
</span>

</th>
</tr>

<tr class="head center">
<td><{"Sunday"|msg}></td>
<td><{"Monday"|msg}></td>
<td><{"Thursday"|msg}></td>
<td><{"Wednesday"|msg}></td>
<td><{"Thursday"|msg}></td>
<td><{"Friday"|msg}></td>
<td><{"Satday"|msg}></td>
</tr>

<{foreach from=$paylog.days item="day"}>

<{if $day.weekday == 0}>
<tr class="odd">
<{/if}>

<{if $paylog.current.month != $day.month}>
<td class="weekday<{$day.weekday}>"><{$day.month}>/<{$day.day}></td>
<{else}>
<td class="weekday<{$day.weekday}>">
<a href="<{url controller="detail" book_id=$paylog.book_id start=$day.date end=$day.date}>">

<span class="date">
<{$day.day}>
</span>

<span class="price outgo">
&nbsp;
<{if $day.out}>
-<{$day.out|currency}>
<{/if}>
</span>

<span class="price income">
&nbsp;
<{if $day.in}>
+<{$day.in|currency}>
<{/if}>
</span>

</a>

</td>
<{/if}>

<{if $day.weekday == 6}>
</tr>
<{/if}>

<{/foreach}>

</table>

</div>